package com.zmn.oms.zmn.normal.business.interfaces.order;

import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.bo.order.BatchFactoryUploadBO;
import com.zmn.oms.model.bo.order.OrderBO;
import com.zmn.oms.model.dto.order.zmn.FactoryBatchNewOrderDIO;
import org.apache.poi.ss.usermodel.Sheet;

import java.util.List;

/**
 * @author sunlife
 * @date:2020/7/3 4:22 下午
 * description:
 */
public interface FactoryOrderBatchBService {

    /**
     * 新增厂商订单
     *
     * @param factoryBatchNewOrderDIO 单个订单
     * @return
     * @throws Exception
     */
    OrderBO insertOrder(FactoryBatchNewOrderDIO factoryBatchNewOrderDIO) throws OmsBaseException;

    public void batchInsertOrder(List<FactoryBatchNewOrderDIO> factoryBatchNewOrderDIOsO) throws OmsBaseException;

    /**
     * 批量新增厂商订单
     *
     * @param factoryBatchNewOrderDIOs 单个订单
     * @return
     * @throws Exception
     */
    void batchInsertOrder(List<FactoryBatchNewOrderDIO> factoryBatchNewOrderDIOs, Long operatorId, String operatorName, Integer operatorType) throws OmsBaseException;

    /**
     * 批量上传新增厂商订单
     *
     * @param sheet excesheet页
     * @return
     * @throws Exception
     */
    void batchInsertOrder(Sheet sheet, Integer factoryId, Long operatorId, String operatorName, Integer operatorType, String batchId) throws OmsBaseException;

    /**
     * 根据批次ID获取导入进度
     *
     * @param batchId
     * @return
     * @throws Exception
     */
    BatchFactoryUploadBO getImportingProgress(String batchId);

    /**
     * 自动确认
     *
     * @param orderBO
     */
    void autoFlowConfirm(OrderBO orderBO);
}
